#!/bin/bash
#

##显示系统里面前五个系统用户,系统用户：uid在1-999

num=0
while read line; do
    uid=$(echo $line | awk -F: '{print $3}')
    if [ $uid -ge 1 -a $uid -le 999 ]; then
	username=$(echo $line | awk -F: '{print $1}')
	echo $username
	let num++
	if [ $num -eq 5 ]; then
	    break
	fi
    fi
done < /etc/passwd
